$(function () {
    var form = new xhForm($('#xh_form'));
    form.parse();
    $('[name=iStaffId]').select2();
    $(".form_date").datetimepicker({format: 'yyyy-mm-dd',language: 'zh-CN',minView: "month", autoclose:true});
    if(info != null){
        form.fill(info);
        $('[name=iStaffId]').val(info['iStaffId']).trigger('change');
    }

    $('#bt_modal_confirm',parent.document).click(function () {
        form.submit('lm/rent/saveRenter',{},function (res) {
            window.top.xhTop.showSuccess(res.msg);
            window.top.xhTop.getActiveFrame()['tabFrame']['renterFrame'].obj.dataGrid.reload();
            window.top.xhTop.closeModal();
        })
    });

});